<template>
  <iframe
    :src="url"
    :key="url"
    style="width: 100%; height: 100%"
    frameborder="0"
    id="myIframe"
    ref="myIframe"></iframe>
</template>

<script>
  import server from '@dt/server/dt'
  export default {
    props: {
      url: String
    },

    data() {
      return {}
    },

    mounted() {
      setTimeout(() => {
        const iframe = document.getElementById('myIframe')
        const iframeWin = iframe.contentWindow || iframe
        iframeWin.postMessage(JSON.stringify(server.auth.info), '*')
      }, 2000)
    },

    methods: {}
  }
</script>

<style lang="scss" scoped></style>
